-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes crash for null ptr #4263
Fixes crash for null ptr #4263
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM++
base::PostTaskAndReplyWithResult(file_task_runner_.get(), FROM_HERE, | ||
base::BindOnce(&SavePublisherInfoOnFileTaskRunner, | ||
publisher_info->Clone(), | ||
std::move(copy), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a developer is copy/pasting there is potential for a bug, a safer approach would be to clone publisher_info
inline for each std::bind
. However, as we all know, copy/paste is the root of all evil
base::PostTaskAndReplyWithResult(file_task_runner_.get(), FROM_HERE, | ||
base::BindOnce(&SavePublisherInfoOnFileTaskRunner, | ||
publisher_info->Clone(), | ||
std::move(copy), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was the main problem, why we saw crashes. If checks are just additional safety measurements
everything passed except Windows (build stopped), so restarting |
Resolves brave/brave-browser#7363
It was introduced in here #4120
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
don't have STR, but this was found from the crash reports and what @emerick found as well
Reviewer Checklist:
After-merge Checklist:
changes has landed on.